<%= javascript_tag "setVariableStripe('#{item.id.to_s}', '#{curr_cycle}')"-%>
<div id= "<%= row_name -%>">
  	<% if item.is_archived? %>
    	<ul class="faux_table_archived">
	<% else %>
	   	<ul class="faux_table<%= curr_cycle %>">
	<% end %>
    <li>
	<% if item.is_archived? %>
	<div class="col1"><%= check_box_tag "variable_ids[]", item.id,false, :class=>'variable_checkbox', :disabled=>true, :id=>"#{row_name + '_checkbox'}" -%></div>
      <div class="col2"><%= image_tag("folds/unfold.png",:title=>"More details...",:alt=>"More details...", :border => 0, :onclick=>"javascript:Element.hide($('#{row_name}'));Element.show($('#{row_name + '_expanded'}'));") -%></div>
	<% else %>
	<div class="col1"><%= check_box_tag "variable_ids[]", item.id,false, :class=>'variable_checkbox', :onclick => "setTrueOrFalse();addOrRemoveHiddenFieldForVariable(#{item.id})",:id=>"#{row_name + '_checkbox'}" -%></div>
      <div class="col2"><%= image_tag("folds/unfold.png",:title=>"More details...",:alt=>"More details...", :border => 0, :onclick=>"javascript:if ($('#{row_name + '_checkbox'}').checked == true) {$('#{row_name + '_expanded_checkbox'}').checked =true} else {$('#{row_name + '_expanded_checkbox'}').checked=false};Field.disable('#{row_name + '_checkbox'}');Field.enable('#{row_name + '_expanded_checkbox'}');draw#{row_name + '_expanded_stats_chart'}Chart();Element.hide($('#{row_name}'));Element.show($('#{row_name + '_expanded'}'));") -%></div>
<% end %>
<% if item.is_archived? %>
<% if item.name.size > 20 -%>
  <div class="col3"><%= link_to(item.hyphenName, variable_path(item), :title=>item.name) -%>(Archived)</div>
<% else -%>
  <div class="col3"><%= link_to(item.name, variable_path(item)) -%>(Archived)</div>
<% end -%>
<% else %>
<% if item.name.size > 20 -%>
  <div class="col3"><%= link_to(item.hyphenName, variable_path(item), :title=>item.name) -%></div>
<% else -%>
  <div class="col3"><%= link_to(item.name, variable_path(item)) -%></div>
<% end -%>
<% end %> 
      <div class="col4">
        <% if item.value != nil -%>
          <%= item.value -%>
        <% else -%>
          <%= "NO DESCRIPTION" -%>
        <% end -%>
      </div>
      <div class="col5">
        <% if item.category != nil -%>
          <%= link_to(item.category, by_category_variables_url(:category=>item.category),:title=>"Show all variables with this category") -%>
        <% else -%>
          <%= "NO CATEGORY" -%>
        <% end -%>
      </div>
       <div class="col6">
        <%= dataset.survey.survey_type.shortname -%>
      </div>
      <div class="col7">
        <%= link_to dataset.name, dataset_url(dataset) -%>
      </div>
      <div class="col8">
	<!-- replace any '-' characters with space -->
        <%= dataset.survey.year.tr('-',' ') -%>
      </div>
	 <div class="col9">
        <%= popularity -%>
      </div>
    </li>
  </ul>
</div>
